<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <script src="../angular.js"></script>
</head>
<body>
    <div ng-repeat="i in [0, 1, 2]">
        <simple>
            <div>Inner content</div>
        </simple>
    </div>
    
    <script>
         var app = angular.module("app", []);
            app.controller("MC", function($scope) { 
            });
        
        
        
           app.directive("simple", function(){
   return {
     restrict: "EA",
     transclude:true,
     template:"<div>{{label}}<div ng-transclude></div></div>",
    controller: function(  $element) {
      console.log("haha");  
    },
     compile: function(element, attributes){
 console.log("hah111111");
         return {
             pre: function(scope, element, attributes, controller, transcludeFn){
 
      console.log("haha"); 
             },
             post: function(scope, element, attributes, controller, transcludeFn){
 
      console.log("haha"); 
             }
         }
     }
   };
});
        
        
        
        
        
        
        
        
        
        
     
        
            angular.bootstrap(document, ["app"]);
    </script>
</body>
</html>